﻿using System.Reflection;

namespace Wicresoft.EKA.NRemedy.CodeGenerate
{
    public class GetGeneratePropertyDelegate : IGetGeneratePropertyDelegate
    {
        public GeneratePropertyDelegate getGeneratePropertyDelegate()
        {
            return new GeneratePropertyDelegate(fieldDelegate);
        }

        private bool fieldDelegate(string propertyName)
        {
            //ARRegularForm arrf = new ARRegularForm();
            //foreach (PropertyInfo pi in arrf.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public))
            //{
            //    if (pi.Name == propertyName)
            //    {
            //        return false;
            //    }
            //}
            //-----changed by parker,comment above code
            //-----since issue Id #9742 【NRemedy.CodeGenerate】Defect for ARRegularForm
            //-----ARRegularForm should be dropped.
            //-----and the code generation should generate all property
            return true;

        }
    }
}
